#obj-m:=heatnan.o
#KERNELDIR:=/lib/modules/4.13.0-36-generic/build/
#PWD:=$(shell pwd)
#modules:                                                                                         
#	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
#modules_install:
#	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install


# KERNELDIR=/lib/modules/4.13.0-36-generic/build/
# PWD:=$(shell pwd)
# INSTALLDIR=.
# obj-m:= hello.o
# modules:
# 	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
# modules_install:
# 	cp hello.ko $(INSTALLDIR)
# clean:
# 	rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
# 	.PHONY: modules modules_install clean

KERNELDIR?=/lib/modules/$(shell uname -r)/build
PWD:=$(shell pwd)
obj-m:=hello.o
.PHONY: clean
default:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
#	-cp hello.ko $(PWD)
clean:
	-rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *.ko



